#include "widget.h"

#include <QApplication>
#include "server.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    HttpServer* httpServer = HttpServer::getInstance();
    if(!httpServer->init())
    {
        qDebug() << "http server启动失败";
        return 1;
    }
    qDebug() << "http server启动成功";

    WebSocketServer* webSocketServer = WebSocketServer::getInstance();
    if(!webSocketServer->init())
    {
        qDebug() << "webSocketServer启动失败";
        return 1;
    }
    qDebug() << "webSocketServer启动成功";

    Widget w;
    w.show();
    return a.exec();
}
